package com.sunday.common.netty.e5_Udp.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.DatagramChannel;
import lombok.extern.slf4j.Slf4j;

/**
 * DatagramChannel 是用于UDP的Channel
 * DatagramPacket 是UDP的数据包
 */
@Slf4j
public class UdpServerChannel extends ChannelInitializer<DatagramChannel> {

    @Override
    protected void initChannel(DatagramChannel ch) throws Exception {
        ch.pipeline()
                .addLast(new UdpServerHandler());
    }
}